package com.iot.manager;

import android.app.Application;
import com.iot.manager.data.models.UserManager;
import com.iot.manager.network.RetrofitClient;

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        
        // 初始化UserManager
        UserManager.init(this);
        
        // 初始化RetrofitClient
        RetrofitClient.init(this);
        
        // 恢复token
        String token = UserManager.getInstance().getToken();
        if (token != null) {
            RetrofitClient.getInstance().setToken(token);
        }
    }
} 